package com.example.testbank;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.ImageButton;

import com.testbank.practise.QuestionList;
import com.testbank.practise.PractiseActivity;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		ImageButton practiseBtn = (ImageButton) findViewById(R.id.practise_btn_id);
		ImageButton testBtn = (ImageButton) findViewById(R.id.test_btn_id);
		ImageButton reviewBtn = (ImageButton) findViewById(R.id.review_btn_id);
		ImageButton aboutBtn = (ImageButton) findViewById(R.id.about_btn_id);
		
		practiseBtn.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
            	/*Bundle bundle = new Bundle();
            	
            	bundle.putString(NotesDbAdapter.KEY_TITLE, mTitleText.getText().toString());
            	bundle.putString(NotesDbAdapter.KEY_BODY, mBodyText.getText().toString());*/
            	
            	Intent intent = new Intent(MainActivity.this, PractiseActivity.class);
        		startActivity(intent);        		
            }
        });
		
		testBtn.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {            	
            	Intent intent = new Intent(MainActivity.this, QuestionList.class);
        		startActivity(intent);        		
            }
        });
		
		reviewBtn.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {            	
            	Intent intent = new Intent(MainActivity.this, QuestionList.class);
        		startActivity(intent);        		
            }
        });
		
		aboutBtn.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {           	
            	Intent intent = new Intent(MainActivity.this, QuestionList.class);
        		startActivity(intent);        		
            }
        });
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
